-
Notifications
You must be signed in to change notification settings - Fork 0
Added state machine #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Just realized i did not implement the mach lock timeout. What was the reasoning for the timeout? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In another PR, but can we break data up as well?
|
Will do unit tests later this week |
375fac9 to
ed78779
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a comprehensive state machine implementation for the Cloudburst rocket's flight control system, tracking the rocket through its complete flight sequence from standby to landing. The state machine uses Zephyr's SMF (State Machine Framework) to manage transitions between flight phases (standby, ascent, mach lock, drogue descent, main descent, and landed) based on altitude and velocity thresholds.
Changes:
- Implemented a flight state machine with six states and configurable transition thresholds
- Added comprehensive unit tests covering all state transitions and edge cases
- Integrated state machine data into the logging system for flight data recording
Reviewed changes
Copilot reviewed 24 out of 25 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| apps/rockets/cloudburst/src/state_machine/state_machine.c | Core state machine implementation with SMF integration and thread management |
| apps/rockets/cloudburst/src/state_machine/state_machine_common.c | Common utilities for state transitions, repeated checks, and action triggers |
| apps/rockets/cloudburst/src/state_machine/states/*.c | Individual state handlers for each flight phase |
| apps/rockets/cloudburst/src/state_machine/*.h | Header files defining state machine interfaces and internal structures |
| apps/rockets/cloudburst/tests/state_machine/src/main.c | Comprehensive unit tests for all state transitions |
| apps/rockets/cloudburst/src/data.c | Added state data getters/setters with mutex protection |
| apps/rockets/cloudburst/src/logger_thread.c | Updated to log state machine data |
| apps/rockets/cloudburst/CMakeLists.txt | Added state machine source files to build |
| apps/rockets/cloudburst/prj.conf | Enabled SMF configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Want to test before merging, but let me know how it looks.